<!--  -->
<template>

  <div class="box1">
    <div>
      <img src="https://img.yzcdn.cn/vant/apple-1.jpg" alt="" srcset="">
      <van-grid :column-num="3">
        <van-grid-item v-for="value in 56" :key="value" icon="photo-o" text="文字" />
      </van-grid>
    </div>
  </div>
</template>

<script lang='ts'>
import { defineComponent, onMounted } from 'vue'
import BScroll from '@better-scroll/core'
export default defineComponent({
	setup() {
		let bscroll = null
		onMounted(() => {
			bscroll = new BScroll('.box1' as any, {
				scrollY: true,
				probeType: 3,
				bounce: {
					top: true,
					bottom: true,
					left: true,
					right: true
				}
			})
			bscroll.on('scroll', ({ y }:{y:any}) => {
				console.log('scrolling-' + y)
			})
		})
	}
})
</script>
<style>
.box1 {
	height: 400px;
	overflow: hidden;
}
</style>